package listen

import (
	"context"
	"github.com/zeromicro/go-zero/core/service"
	"xialou_platform/app/aliyunmq/rocket"
	"xialou_platform/services/wallet/api/internal/config"
	"xialou_platform/services/wallet/api/internal/mqs"
	"xialou_platform/services/wallet/api/internal/svc"
)

func xiaLouWalletIncomeExpireMq(c config.Config, ctx context.Context, svcContext *svc.ServiceContext) []service.Service {

	var conf rocket.ConsumerConf
	rocket.TransformConsumer(c.XiaLouWalletIncomeExpireQueue, c.AliyunMq, &conf)
	return []service.Service{
		// listen store info update
		rocket.MustNewQueue(conf, mqs.NewXiaLouWalletIncomeExpire(ctx, svcContext)),
	}
}

func xiaLouUserBindAgentQueueMq(c config.Config, ctx context.Context, svcContext *svc.ServiceContext) []service.Service {

	var conf rocket.ConsumerConf
	rocket.TransformConsumer(c.XiaLouUserBindAgentQueue, c.AliyunMq, &conf)
	return []service.Service{
		// listen store info update
		rocket.MustNewQueue(conf, mqs.NewXiaLouUserBindAgent(ctx, svcContext)),
	}
}
